
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>openGLES模块 · Aivin开发笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Aivin">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-versions-select/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-local-video/video-js.min.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../styles/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="openGLES基础.html" />
    
    
    <link rel="prev" href="../SoundTouch/实现音频变速和变调.html" />
    

    
        <link rel="shortcut icon" href='../../assets/images/favicon.ico' type="image/x-icon">
    
    
        <link rel="bookmark" href='../../assets/images/favicon.ico' type="image/x-icon">
    
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    项目说明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../linux/linux基础.html">
            
                <a href="../linux/linux基础.html">
            
                    
                    linux
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../linux/linux基础.html">
            
                <a href="../linux/linux基础.html">
            
                    
                    linux基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../linux/android底层开发.html">
            
                <a href="../linux/android底层开发.html">
            
                    
                    android底层开发
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../c语言/c基础.html">
            
                <a href="../c语言/c基础.html">
            
                    
                    c
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../c语言/c基础.html">
            
                <a href="../c语言/c基础.html">
            
                    
                    c基础
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../c++/c++基础.html">
            
                <a href="../c++/c++基础.html">
            
                    
                    c++
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../c++/c++基础.html">
            
                <a href="../c++/c++基础.html">
            
                    
                    c++基础
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../QT/QT基础.html">
            
                <a href="../QT/QT基础.html">
            
                    
                    QT
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../QT/QT基础.html">
            
                <a href="../QT/QT基础.html">
            
                    
                    QT基础
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../jni/JNI基础.html">
            
                <a href="../jni/JNI基础.html">
            
                    
                    JNI
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../jni/JNI基础.html">
            
                <a href="../jni/JNI基础.html">
            
                    
                    JNI基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../jni/JNI例子.html">
            
                <a href="../jni/JNI例子.html">
            
                    
                    JNI例子
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../SDL/SDL基础.html">
            
                <a href="../SDL/SDL基础.html">
            
                    
                    SDL
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../SDL/SDL基础.html">
            
                <a href="../SDL/SDL基础.html">
            
                    
                    SDL基础
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../ffmpeg/ffmpeg基础.html">
            
                <a href="../ffmpeg/ffmpeg基础.html">
            
                    
                    ffmpeg
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../ffmpeg/ffmpeg基础.html">
            
                <a href="../ffmpeg/ffmpeg基础.html">
            
                    
                    ffmpeg基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../ffmpeg/ffmpeg示例代码.html">
            
                <a href="../ffmpeg/ffmpeg示例代码.html">
            
                    
                    ffmpeg示例代码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../ffmpeg/ffmpeg软解rtsp简单直播.html">
            
                <a href="../ffmpeg/ffmpeg软解rtsp简单直播.html">
            
                    
                    ffmpeg软解rtsp简单直播
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../ffmpeg/rtsp服务器.html">
            
                <a href="../ffmpeg/rtsp服务器.html">
            
                    
                    rtsp服务器Windows
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../opencv/opencv模块.html">
            
                <a href="../opencv/opencv模块.html">
            
                    
                    opencv模块
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../opencv/opencv.html">
            
                <a href="../opencv/opencv.html">
            
                    
                    opencv
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../openSLES/openSLES基础.html">
            
                <a href="../openSLES/openSLES基础.html">
            
                    
                    openSLES
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../openSLES/openSLES基础.html">
            
                <a href="../openSLES/openSLES基础.html">
            
                    
                    openSLES基础
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../SoundTouch/移植SoundTouch.html">
            
                <a href="../SoundTouch/移植SoundTouch.html">
            
                    
                    SoundTouch
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../SoundTouch/移植SoundTouch.html">
            
                <a href="../SoundTouch/移植SoundTouch.html">
            
                    
                    移植SoundTouch
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="../SoundTouch/实现音频变速和变调.html">
            
                <a href="../SoundTouch/实现音频变速和变调.html">
            
                    
                    实现音频变速和变调
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter active" data-level="1.12" data-path="openGLES基础.html">
            
                <a href="openGLES基础.html">
            
                    
                    openGLES模块
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.12.1" data-path="openGLES基础.html">
            
                <a href="openGLES基础.html">
            
                    
                    openGLES基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.2" data-path="GLSL基础.html">
            
                <a href="GLSL基础.html">
            
                    
                    GLSL基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.3" data-path="openglES示例.html">
            
                <a href="openglES示例.html">
            
                    
                    openglES示例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../视频相关/音视频基础.html">
            
                <a href="../视频相关/音视频基础.html">
            
                    
                    音视频术语-文件格式-协议
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../视频相关/音视频基础.html">
            
                <a href="../视频相关/音视频基础.html">
            
                    
                    音视频基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.2" data-path="../视频相关/RTSP.html">
            
                <a href="../视频相关/RTSP.html">
            
                    
                    RTSP
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.3" data-path="../视频相关/RTP.html">
            
                <a href="../视频相关/RTP.html">
            
                    
                    RTP
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.4" data-path="../视频相关/RTCP.html">
            
                <a href="../视频相关/RTCP.html">
            
                    
                    RTCP
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.5" data-path="../视频相关/H264.html">
            
                <a href="../视频相关/H264.html">
            
                    
                    H264
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.6" data-path="../视频相关/YUV.html">
            
                <a href="../视频相关/YUV.html">
            
                    
                    YUV
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.7" data-path="../视频相关/SurfaceView.html">
            
                <a href="../视频相关/SurfaceView.html">
            
                    
                    SurfaceView
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.8" data-path="../视频相关/RTMP.html">
            
                <a href="../视频相关/RTMP.html">
            
                    
                    RTMP
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.9" data-path="../视频相关/AAC详解.html">
            
                <a href="../视频相关/AAC详解.html">
            
                    
                    AAC详解
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="../音视频相关代码/音视频相关代码.html">
            
                <a href="../音视频相关代码/音视频相关代码.html">
            
                    
                    音视频相关代码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="../ndk/NDK编译基础.html">
            
                <a href="../ndk/NDK编译基础.html">
            
                    
                    NDK工程编译
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.15.1" data-path="../ndk/NDK编译基础.html">
            
                <a href="../ndk/NDK编译基础.html">
            
                    
                    NDK编译基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.2" data-path="../ndk/cmake方式.html">
            
                <a href="../ndk/cmake方式.html">
            
                    
                    cmake
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.3" data-path="../ndk/Android.mk模板.html">
            
                <a href="../ndk/Android.mk模板.html">
            
                    
                    Android.mk
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.4" data-path="../ndk/Application.mk模板.html">
            
                <a href="../ndk/Application.mk模板.html">
            
                    
                    Application.mk
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >openGLES模块</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon "></span><a href="#opengles&#x6A21;&#x5757;"><b>1. </b>openGLES&#x6A21;&#x5757;</a></li><ul><li><span class="title-icon "></span><a href="#&#x4E13;&#x4E1A;&#x540D;&#x8BCD;"><b>1.1. </b>&#x4E13;&#x4E1A;&#x540D;&#x8BCD;</a></li><li><span class="title-icon "></span><a href="#&#x5750;&#x6807;&#x7CFB;&#x7C7B;&#x578B;"><b>1.2. </b>&#x5750;&#x6807;&#x7CFB;&#x7C7B;&#x578B;</a></li><li><span class="title-icon "></span><a href="#gles20-&#x5E38;&#x7528;&#x53D8;&#x91CF;"><b>1.3. </b>GLES20 &#x5E38;&#x7528;&#x53D8;&#x91CF;</a></li><li><span class="title-icon "></span><a href="#egl10-&#x5E38;&#x7528;&#x51FD;&#x6570;"><b>1.4. </b>EGL10 &#x5E38;&#x7528;&#x51FD;&#x6570;</a></li><li><span class="title-icon "></span><a href="#&#x5E38;&#x7528;&#x51FD;&#x6570;"><b>1.5. </b>&#x5E38;&#x7528;&#x51FD;&#x6570;</a></li><li><span class="title-icon "></span><a href="#&#x5E38;&#x7528;&#x7C7B;&#x4E0E;&#x5E38;&#x91CF;&#x53D8;&#x91CF;"><b>1.6. </b>&#x5E38;&#x7528;&#x7C7B;&#x4E0E;&#x5E38;&#x91CF;&#x53D8;&#x91CF;</a></li><li><span class="title-icon "></span><a href="#&#x8865;&#x5145;&#x7EC6;&#x8282;"><b>1.7. </b>&#x8865;&#x5145;&#x7EC6;&#x8282;</a></li><li><span class="title-icon "></span><a href="#&#x7D22;&#x5F15;&#x7ED8;&#x5236;"><b>1.8. </b>&#x7D22;&#x5F15;&#x7ED8;&#x5236;</a></li><li><span class="title-icon "></span><a href="#&#x957F;&#x5BBD;&#x6BD4;&#x4F8B;&#x53D8;&#x5F62;&#x95EE;&#x9898;"><b>1.9. </b>&#x957F;&#x5BBD;&#x6BD4;&#x4F8B;&#x53D8;&#x5F62;&#x95EE;&#x9898;</a></li><li><span class="title-icon "></span><a href="#&#x7403;&#x9762;&#x7ED8;&#x5236;"><b>1.10. </b>&#x7403;&#x9762;&#x7ED8;&#x5236;</a></li><li><span class="title-icon "></span><a href="#android-&#x914D;&#x7F6E;opengl-es-&#x73AF;&#x5883;"><b>1.11. </b>android &#x914D;&#x7F6E;OpenGL ES &#x73AF;&#x5883;</a></li></ul></ul></div><a href="#opengles&#x6A21;&#x5757;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="opengles&#x6A21;&#x5757;"><a name="opengles&#x6A21;&#x5757;" class="anchor-navigation-ex-anchor" href="#opengles&#x6A21;&#x5757;"><i class="fa fa-link" aria-hidden="true"></i></a>1. openGLES&#x6A21;&#x5757;</h1>
<p>Open Graphics Library</p>
<h2 id="&#x4E13;&#x4E1A;&#x540D;&#x8BCD;"><a name="&#x4E13;&#x4E1A;&#x540D;&#x8BCD;" class="anchor-navigation-ex-anchor" href="#&#x4E13;&#x4E1A;&#x540D;&#x8BCD;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1. &#x4E13;&#x4E1A;&#x540D;&#x8BCD;</h2>
<table>
<thead>
<tr>
<th>&#x540D;&#x8BCD;</th>
<th>&#x4F5C;&#x7528;</th>
</tr>
</thead>
<tbody>
<tr>
<td>OpenGL</td>
<td>&#x4E00;&#x4E2A;&#x8DE8;&#x5E73;&#x53F0;&#x7684;&#x56FE;&#x5F62;API&#xFF0C;&#x63D0;&#x4F9B;&#x4E86;&#x8F6F;&#x4EF6;&#x64CD;&#x4F5C;&#xFF13;&#xFF24;&#x56FE;&#x5F62;&#x786C;&#x4EF6;&#x7684;&#x63A5;&#x53E3;&#x3002;<br>OpenGL &#x7684;&#x57FA;&#x672C;&#x5F62;&#x72B6;&#x662F;&#x4E09;&#x89D2;&#x5F62;&#x3002;</td>
</tr>
<tr>
<td>OpenGLES</td>
<td>&#x4E00;&#x4E2A;&#x4E13;&#x7528;&#x4E8E;&#x5D4C;&#x5165;&#x5F0F;&#x8BBE;&#x5907;&#x7684;&#x9609;&#x5272;&#x7248;&#x7684;OpenGL&#x3002;<br> [Android 1.0 , +&#x221E;) &#x652F;&#x6301; OpenGL ES 1.0 <br> [Android 2.2 , +&#x221E;)  &#x652F;&#x6301; OpenGL ES 2.0 <br> [Android 4.3 , +&#x221E;) &#x652F;&#x6301; OpenGL ES 3.0 <br> [Android 5.0 , +&#x221E;) &#x652F;&#x6301;OpenGL ES 3.1</td>
</tr>
<tr>
<td>GLSL <br>(OpenGL Shader Language)</td>
<td>&#x7740;&#x8272;&#x5668;&#x8BED;&#x8A00;&#x3002;&#x9762;&#x5411;&#x8FC7;&#x7A0B;&#x3002;</td>
</tr>
<tr>
<td>&#x9876;&#x70B9;&#x7740;&#x8272;&#x5668; Vertex shader</td>
<td>&#x628A;&#x9876;&#x70B9;&#x5728;&#x865A;&#x62DF;&#x7A7A;&#x95F4;&#x4E2D;&#x7684;&#x4E09;&#x7EF4;&#x5750;&#x6807;&#x53D8;&#x6362;&#x4E3A;&#x5728;&#x5C4F;&#x5E55;&#x4E0A;&#x7684;&#x4E8C;&#x7EF4;&#x5750;&#x6807;&#x3002;<br> &#x5E76;&#x5E26;&#x6709;&#x7528;&#x4E8E;z-buffer&#x7684;&#x6DF1;&#x5EA6;&#x4FE1;&#x606F;&#x3002;</td>
</tr>
<tr>
<td>&#x7247;&#x5143;&#x7740;&#x8272;&#x5668; Fragment shader</td>
<td>&#x9488;&#x5BF9;&#x6BCF;&#x4E2A;&#x7247;&#x5143;(&#x50CF;&#x7D20;)&#xFF0C;&#x7528;&#x4E8E;&#x786E;&#x5B9A;&#x6BCF;&#x4E2A;&#x7247;&#x5143;&#x7684;&#x989C;&#x8272;&#x3002;</td>
</tr>
<tr>
<td>EGL<br>(Embedded Graphics Library)</td>
<td>&#x8FDE;&#x63A5;OpenGL ES&#x548C;&#x672C;&#x5730;&#x7A97;&#x53E3;&#x7CFB;&#x7EDF;&#x7684;&#x63A5;&#x53E3;&#xFF0C;&#x5C4F;&#x853D;&#x4E0D;&#x540C;&#x5E73;&#x53F0;&#x4E0A;&#x7684;&#x533A;&#x522B;&#x3002;&#x4ECE;&#x800C;&#x5B9E;&#x73B0;&#x8DE8;&#x5E73;&#x53F0;&#x3002;</td>
</tr>
<tr>
<td>&#x6E32;&#x67D3;&#x7BA1;&#x7EBF;</td>
<td>&#x6307;&#x7684;&#x662F;&#x4E00;&#x5806;&#x539F;&#x59CB;&#x56FE;&#x5F62;&#x6570;&#x636E;&#x9014;&#x7ECF;&#x4E00;&#x4E2A;&#x8F93;&#x9001;&#x7BA1;&#x9053;&#xFF0C;&#x671F;&#x95F4;&#x7ECF;&#x8FC7;&#x5404;&#x79CD;&#x53D8;&#x5316;&#x5904;&#x7406;&#x6700;&#x7EC8;&#x51FA;&#x73B0;&#x5728;&#x5C4F;&#x5E55;&#x7684;&#x8FC7;&#x7A0B;</td>
</tr>
<tr>
<td>&#x6295;&#x5F71;&#x77E9;&#x9635;<br>Projection Matrix</td>
<td>&#x5728;OpenGL&#x4E2D;&#xFF0C;&#x6295;&#x5F71;&#x77E9;&#x9635;&#x7528;&#x6765;&#x6539;&#x53D8;&#x573A;&#x666F;&#x5728;&#x5C4F;&#x5E55;&#x4E0A;&#x7684;&#x663E;&#x793A;&#x65B9;&#x5F0F;&#xFF08;&#x8FD1;&#x5927;&#x8FDC;&#x5C0F;&#x3001;&#x5E73;&#x884C;&#x6295;&#x5F71;&#x7B49;&#xFF09;</td>
</tr>
<tr>
<td>&#x6B63;&#x4EA4;&#x6295;&#x5F71;</td>
<td>&#x6295;&#x5F71;&#x7EBF;&#x662F;&#x5E73;&#x884C;&#x7684;&#x3002;&#x7269;&#x4F53;&#x4E0D;&#x4F1A;&#x968F;&#x8DDD;&#x79BB;&#x89C2;&#x6D4B;&#x70B9;&#x7684;&#x4F4D;&#x7F6E;&#x800C;&#x5927;&#x5C0F;&#x53D1;&#x751F;&#x53D8;&#x5316;&#x3002;</td>
</tr>
<tr>
<td>&#x6295;&#x5F71;</td>
<td>&#x8BA9;3D&#x4E16;&#x754C;&#x5448;&#x73B0;&#x5728;2D&#x4E16;&#x754C;&#x7684;&#x8FC7;&#x7A0B;&#x3002;</td>
</tr>
<tr>
<td>&#x900F;&#x89C6;&#x6295;&#x5F71;</td>
<td>&#x6A21;&#x4EFF;&#x4EBA;&#x773C;&#x89C2;&#x5BDF;3D&#x4E16;&#x754C;&#x7684;&#x89C4;&#x5F8B;&#xFF0C;&#x8BA9;&#x7269;&#x4F53;&#x8FD1;&#x5927;&#x8FDC;&#x5C0F;&#x3002;</td>
</tr>
<tr>
<td>&#x5149;&#x6805;&#x5316;</td>
<td>&#x5373;&#x50CF;&#x7D20;&#x5316;&#x3002;<br>&#x628A;&#x70B9;&#x3001;&#x7EBF;&#x3001;&#x4E09;&#x89D2;&#x5F62;&#x6620;&#x5C04;&#x5230;&#x5C4F;&#x5E55;&#x4E0A;&#x7684;&#x50CF;&#x7D20;&#x70B9;&#x7684;&#x8FC7;&#x7A0B;&#x3002;</td>
</tr>
<tr>
<td>&#x5149;&#x7167;</td>
<td>1&#x3001;&#x73AF;&#x5883;&#x5149;  <br> 2&#x3001;&#x955C;&#x9762;&#x5149; <br> 3&#x3001;&#x6563;&#x5C04;&#x5149;</td>
</tr>
<tr>
<td>VBO</td>
<td>&#x9876;&#x70B9;&#x7F13;&#x51B2;&#x5BF9;&#x8C61;&#xFF08;Vertex Buffer Objects&#xFF0C;VBO&#xFF09;<br>&#x4FDD;&#x5B58;&#x4E86;&#x4E00;&#x4E2A;&#x6A21;&#x578B;&#x7684;&#x9876;&#x70B9;&#x5C5E;&#x6027;&#x4FE1;&#x606F;</td>
</tr>
<tr>
<td>VAO</td>
<td>&#x9876;&#x70B9;&#x6570;&#x7EC4;&#x5BF9;&#x8C61;&#xFF08;Vertex Arrary Object&#xFF0C;VAO&#xFF09;<br>VAO&#x76F8;&#x5F53;&#x4E8E;&#x662F;&#x5BF9;&#x5F88;&#x591A;&#x4E2A;VBO&#x7684;&#x5F15;&#x7528;</td>
</tr>
<tr>
<td>EBO</td>
<td>&#x7D22;&#x5F15;&#x7F13;&#x51B2;&#x5BF9;&#x8C61;&#xFF08;Element Buffer Object&#xFF0C;EBO&#xFF09;<br>&#x5B58;&#x50A8;&#x9876;&#x70B9;&#x4F4D;&#x7F6E;&#x7684;&#x7D22;&#x5F15;</td>
</tr>
<tr>
<td>FBO</td>
<td>Frame Buffer Object  &#x5E27;&#x7F13;&#x51B2;&#x5BF9;&#x8C61;</td>
</tr>
<tr>
<td>&#x7EB9;&#x7406;</td>
<td>&#x53EF;&#x4EE5;&#x5C06;&#x7EB9;&#x7406;&#x770B;&#x505A;&#x5E94;&#x7528;&#x5728;&#x7269;&#x4F53;&#x8868;&#x9762;&#x7684;&#x50CF;&#x7D20;&#x989C;&#x8272;&#x3002;</td>
</tr>
<tr>
<td>&#x7EB9;&#x7406;&#x6620;&#x5C04;</td>
<td>&#x5C06;2D&#x7684;&#x7EB9;&#x7406;&#x6620;&#x5C04;&#x5230;3D&#x573A;&#x666F;&#x4E2D;&#x7684;&#x7ACB;&#x4F53;&#x7269;&#x4F53;&#x4E0A;&#x3002;</td>
</tr>
<tr>
<td>&#x8D34;&#x56FE;</td>
<td></td>
</tr>
<tr>
<td>&#x9634;&#x5F71;</td>
<td></td>
</tr>
<tr>
<td>&#x7C92;&#x5B50;</td>
<td></td>
</tr>
<tr>
<td>&#x6DF7;&#x5408;&#x4E0E;&#x96FE;</td>
<td></td>
</tr>
<tr>
<td>&#x6807;&#x5FD7;&#x677F;</td>
<td></td>
</tr>
<tr>
<td>&#x5929;&#x7A7A;&#x76D2;</td>
<td></td>
</tr>
<tr>
<td>&#x5929;&#x7A7A;&#x7A79;</td>
<td></td>
</tr>
<tr>
<td>&#x76F8;&#x673A;UP&#x65B9;&#x5411;</td>
<td>&#x7406;&#x89E3;&#x4E3A;&#x76F8;&#x673A;&#x9876;&#x7AEF;&#x6307;&#x5411;&#x7684;&#x65B9;&#x5411;&#x3002;&#x659C;&#x7740;&#x3001;&#x5012;&#x7740;&#x4E4B;&#x7C7B;&#x7684;</td>
</tr>
<tr>
<td>.STL&#x6587;&#x4EF6;</td>
<td>3D&#x6A21;&#x578B;&#x6587;&#x4EF6;</td>
</tr>
<tr>
<td>.sh</td>
<td>&#x7740;&#x8272;&#x5668;&#x8BED;&#x8A00;&#x6587;&#x4EF6;</td>
</tr>
<tr>
<td>.obj</td>
<td>3D&#x6A21;&#x578B;&#x6587;&#x4EF6;</td>
</tr>
<tr>
<td>.mtl</td>
<td>&#x6750;&#x8D28;&#x3001;&#x8D34;&#x56FE;&#x6587;&#x4EF6;</td>
</tr>
</tbody>
</table>
<h2 id="&#x5750;&#x6807;&#x7CFB;&#x7C7B;&#x578B;"><a name="&#x5750;&#x6807;&#x7CFB;&#x7C7B;&#x578B;" class="anchor-navigation-ex-anchor" href="#&#x5750;&#x6807;&#x7CFB;&#x7C7B;&#x578B;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2. &#x5750;&#x6807;&#x7CFB;&#x7C7B;&#x578B;</h2>
<table>
<thead>
<tr>
<th>&#x7C7B;&#x578B;</th>
<th>&#x7279;&#x70B9;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x5C40;&#x90E8;&#x5750;&#x6807;&#x7CFB;(Local Space) / (Object Space)</td>
<td>&#x4EE5;&#x81EA;&#x8EAB;&#x4E3A;&#x53C2;&#x7167;&#x70B9;</td>
</tr>
<tr>
<td>&#x4E16;&#x754C;&#x5750;&#x6807;&#x7CFB;(World Space)</td>
<td>[ -1 , 1 ]&#x6807;&#x3002;<br></td>
</tr>
<tr>
<td>&#x76F8;&#x673A;&#x5750;&#x6807;&#x7CFB;(View Space) / (Eye Space)</td>
<td>&#x76F8;&#x673A;&#x6240;&#x5728;&#x7684;&#x4F4D;&#x7F6E;&#x4E3A;&#x539F;&#x70B9;&#x3002;XYZ&#x8F74;&#x7684;&#x65B9;&#x5411; &#x6839;&#x636E;&#x60C5;&#x51B5;&#x800C;&#x5B9A;&#x3002;</td>
</tr>
<tr>
<td>&#x88C1;&#x526A;&#x5750;&#x6807;&#x7CFB;(Clip Space)</td>
<td>&#xFF1F;</td>
</tr>
<tr>
<td>&#x5C4F;&#x5E55;&#x5750;&#x6807;&#x7CFB;(Screen Space)</td>
<td>&#x5C31;&#x662F;&#x5448;&#x73B0;&#x5728;&#x5C4F;&#x5E55;&#x4E0A;&#x7684;&#x5927;&#x5C0F;</td>
</tr>
<tr>
<td>&#x7EB9;&#x7406;&#x5750;&#x6807;&#x7CFB;</td>
<td>[ -1 , 1 ]</td>
</tr>
</tbody>
</table>
<pre><code class="lang-xml">&#x6CE8;&#xFF1A;&#x7EB9;&#x7406;&#x5750;&#x6807;&#x7684;y&#x8F74;&#x7684;&#x65B9;&#x5411;&#x548C;&#x56FE;&#x7247;&#x7684;Y&#x8F74;&#x65B9;&#x5411;&#x76F8;&#x53CD;&#x3002;&#x6240;&#x4EE5;&#x662F;&#x8981;&#x8FDB;&#x884C;y&#x8F74;&#x53CD;&#x8F6C;&#x7684; &#x3002;&#xFF1F;&#xFF1F;
</code></pre>
<p><img src="https://gitee.com/hnyer/filesOfGitbook/raw/master/files/201804171454_osChina_&#x5750;&#x6807;&#x7CFB;.png" alt=""></p>
<h2 id="gles20-&#x5E38;&#x7528;&#x53D8;&#x91CF;"><a name="gles20-&#x5E38;&#x7528;&#x53D8;&#x91CF;" class="anchor-navigation-ex-anchor" href="#gles20-&#x5E38;&#x7528;&#x53D8;&#x91CF;"><i class="fa fa-link" aria-hidden="true"></i></a>1.3. GLES20 &#x5E38;&#x7528;&#x53D8;&#x91CF;</h2>
<table>
<thead>
<tr>
<th><a href="https://developer.android.google.cn/reference/android/opengl/GLES20.html" target="_blank">GLES20</a> &#x5E38;&#x7528;&#x53D8;&#x91CF;</th>
<th>&#x610F;&#x4E49;</th>
</tr>
</thead>
<tbody>
<tr>
<td>GL_DEPTH_BUFFER_BIT</td>
<td>&#x6E05;&#x7A7A; &#x6DF1;&#x5EA6;&#x7F13;&#x51B2;&#x533A;</td>
</tr>
<tr>
<td>GL_COLOR_BUFFER_BIT</td>
<td>&#x6E05;&#x7A7A; &#x989C;&#x8272;&#x7F13;&#x51B2;&#x533A;</td>
</tr>
<tr>
<td>GL_ACCUM_BUFFER_BIT</td>
<td>&#x6E05;&#x7A7A; &#x7D2F;&#x79EF;&#x7F13;&#x51B2;&#x533A;</td>
</tr>
<tr>
<td>GL_STENCIL_BUFFER_BIT</td>
<td>&#x6E05;&#x7A7A;&#x6A21;&#x677F;&#x7F13;&#x51B2;&#x533A;</td>
</tr>
<tr>
<td>GL_FLOAT</td>
<td></td>
</tr>
<tr>
<td>GL_TRIANGLES</td>
<td>&#x6BCF;&#x4E09;&#x4E2A;&#x9876;&#x70B9;&#x7ED8;&#x5236;&#x4E00;&#x4E2A;&#x4E09;&#x89D2;&#x5F62;</td>
</tr>
<tr>
<td>GL_TRIANGLE_STRIP</td>
<td>&#x7ED8;&#x5236;&#x4E09;&#x89D2;&#x5F62;&#x7684;&#x4E00;&#x79CD;&#x987A;&#x5E8F;</td>
</tr>
<tr>
<td>GL_TRIANGLE_FAN</td>
<td>&#x7ED8;&#x5236;&#x4E09;&#x89D2;&#x5F62;&#x7684;&#x4E00;&#x79CD;&#x987A;&#x5E8F;</td>
</tr>
<tr>
<td>GL_TEXTURE0</td>
<td></td>
</tr>
<tr>
<td>GL_TEXTURE_2D</td>
<td></td>
</tr>
<tr>
<td>GL_UNSIGNED_SHORT</td>
<td></td>
</tr>
<tr>
<td>GL_VERTEX_SHADER</td>
<td></td>
</tr>
<tr>
<td>GL_FRAGMENT_SHADER</td>
<td></td>
</tr>
<tr>
<td>GL_LINK_STATUS</td>
<td></td>
</tr>
<tr>
<td>GL_TRUE</td>
<td></td>
</tr>
<tr>
<td>GL_COMPILE_STATUS</td>
<td></td>
</tr>
<tr>
<td>GLES20 &#x5E38;&#x7528;&#x51FD;&#x6570;</td>
<td>&#x610F;&#x4E49;</td>
</tr>
<tr>
<td>glGetUniformLocation ( int program,String name)</td>
<td>&#x6839;&#x636E;name&#x83B7;&#x53D6;uniform&#x7C7B;&#x578B;&#x53D8;&#x91CF;&#x7684;id</td>
</tr>
<tr>
<td>glGetAttribLocation( int program,  String name)</td>
<td>&#x6839;&#x636E;name&#x83B7;&#x53D6;attribute&#x7C7B;&#x578B;&#x53D8;&#x91CF;&#x7684;id</td>
</tr>
<tr>
<td>glUseProgram</td>
<td>&#x5C06;&#x7A0B;&#x5E8F;&#x52A0;&#x5165;&#x5230;OpenGLES&#x73AF;&#x5883;</td>
</tr>
<tr>
<td>glEnableVertexAttribArray</td>
<td>&#x542F;&#x7528;&#x9876;&#x70B9;&#x5750;&#x6807;&#x6570;&#x7EC4;<br>&#x542F;&#x52A8;&#x9876;&#x70B9;&#x7EB9;&#x7406;&#x6570;&#x7EC4;</td>
</tr>
<tr>
<td>glVertexAttribPointer</td>
<td>&#x51C6;&#x5907;&#x9876;&#x70B9;&#x4F4D;&#x7F6E;&#x6570;&#x636E;</td>
</tr>
<tr>
<td>glDrawArrays</td>
<td>&#x56FE;&#x5F62;&#x7ED8;&#x5236;</td>
</tr>
<tr>
<td>glClear</td>
<td>&#x6E05;&#x9664;&#x7F13;&#x51B2;&#x533A;</td>
</tr>
<tr>
<td>glCreateProgram</td>
<td>&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x7A7A;&#x7684;OpenGLES&#x7A0B;&#x5E8F;</td>
</tr>
<tr>
<td>glUniformMatrix4fv</td>
<td>&#x5C06;&#x6700;&#x7EC8;&#x53D8;&#x6362;&#x77E9;&#x9635;&#x4F20;&#x5165;shader&#x7A0B;&#x5E8F;</td>
</tr>
<tr>
<td>glDisableVertexAttribArray</td>
<td>&#x7981;&#x6B62;&#x9876;&#x70B9;&#x6570;&#x7EC4;&#x7684;&#x53E5;&#x67C4;</td>
</tr>
<tr>
<td>glDrawElements</td>
<td>&#x7D22;&#x5F15;&#x6CD5;&#x7ED8;&#x5236;</td>
</tr>
<tr>
<td>glUniform4fv</td>
<td>&#x8BBE;&#x7F6E;&#x7ED8;&#x5236;&#x4E09;&#x89D2;&#x5F62;&#x7684;&#x989C;&#x8272;</td>
</tr>
<tr>
<td>glUniform1i</td>
<td></td>
</tr>
<tr>
<td>glUniform1f</td>
<td></td>
</tr>
<tr>
<td>glBindTexture</td>
<td>&#x7ED1;&#x5B9A;&#x7EB9;&#x7406;</td>
</tr>
<tr>
<td>glActiveTexture</td>
<td>&#x9009;&#x62E9;&#x6D3B;&#x52A8;&#x7EB9;&#x7406;&#x5355;&#x5143;</td>
</tr>
<tr>
<td>glShaderSource</td>
<td>&#x5C06;&#x8D44;&#x6E90;&#x52A0;&#x5165;&#x5230;&#x7740;&#x8272;&#x5668;&#x4E2D;</td>
</tr>
<tr>
<td>glCompileShader</td>
<td>&#x7F16;&#x8BD1;&#x7740;&#x8272;&#x5668;</td>
</tr>
<tr>
<td>glGetShaderiv</td>
<td></td>
</tr>
<tr>
<td>glDeleteShader</td>
<td></td>
</tr>
<tr>
<td>glCreateShader</td>
<td>&#x6839;&#x636E;type&#x521B;&#x5EFA;&#x7740;&#x8272;&#x5668;</td>
</tr>
<tr>
<td>glAttachShader</td>
<td>&#x5C06;&#x7740;&#x8272;&#x5668;&#x52A0;&#x5165;&#x5230;&#x7A0B;&#x5E8F;</td>
</tr>
<tr>
<td>glLinkProgram</td>
<td>&#x8FDE;&#x63A5;&#x5230;&#x7740;&#x8272;&#x5668;&#x7A0B;&#x5E8F;</td>
</tr>
<tr>
<td>glGetProgramiv</td>
<td></td>
</tr>
<tr>
<td>glDeleteProgram</td>
<td></td>
</tr>
<tr>
<td>glClearColor</td>
<td>&#x6E05;&#x5C4F;&#x65F6;&#xFF0C;&#x4F7F;&#x7528;&#x8BE5;&#x989C;&#x8272;&#x586B;&#x5145;&#x6574;&#x4E2A;&#x5C4F;&#x5E55;</td>
</tr>
<tr>
<td>glViewport</td>
<td>&#x786E;&#x5B9A;&#x7ED8;&#x5236;&#x533A;&#x57DF;</td>
</tr>
<tr>
<td>glReadPixels</td>
<td>&#x83B7;&#x53D6;&#x6B63;&#x5728;&#x663E;&#x793A;&#x7684;&#x50CF;&#x7D20;</td>
</tr>
<tr>
<td>glGenTextures</td>
<td>&#x751F;&#x6210;&#x7EB9;&#x7406;</td>
</tr>
<tr>
<td>glTexParameterf</td>
<td>&#x7EB9;&#x7406;&#x8FC7;&#x6EE4;&#x51FD;&#x6570;</td>
</tr>
<tr>
<td>texImage2D</td>
<td>&#x751F;&#x6210;2D&#x7EB9;&#x7406;</td>
</tr>
</tbody>
</table>
<h2 id="egl10-&#x5E38;&#x7528;&#x51FD;&#x6570;"><a name="egl10-&#x5E38;&#x7528;&#x51FD;&#x6570;" class="anchor-navigation-ex-anchor" href="#egl10-&#x5E38;&#x7528;&#x51FD;&#x6570;"><i class="fa fa-link" aria-hidden="true"></i></a>1.4. EGL10 &#x5E38;&#x7528;&#x51FD;&#x6570;</h2>
<table>
<thead>
<tr>
<th><a href="https://developer.android.google.cn/reference/javax/microedition/khronos/egl/EGL10.html" target="_blank">EGL10</a> &#x5E38;&#x7528;&#x51FD;&#x6570;</th>
<th>&#x610F;&#x4E49;</th>
</tr>
</thead>
<tbody>
<tr>
<td>glMatrixMode</td>
<td>&#x4F7F;&#x7528;&#x7684;&#x77E9;&#x9635;&#x7C7B;&#x578B;</td>
</tr>
<tr>
<td>glFrustumf</td>
<td>&#x4E09;&#x7EF4;&#x7528;&#x4E8C;&#x7EF4;&#x663E;&#x793A;&#x51FA;&#x6765;&#x9700;&#x8981;&#x6307;&#x5B9A;&#x7684;&#x4E00;&#x4E9B;&#x53C2;&#x6570;</td>
</tr>
<tr>
<td>glLoadIdentity</td>
<td>&#x8BBE;&#x7F6E;&#x4E3A;&#x5355;&#x4F4D;&#x77E9;&#x9635;</td>
</tr>
<tr>
<td>glDepthFunc</td>
<td>&#x6DF1;&#x5EA6;&#x6BD4;&#x8F83;</td>
</tr>
<tr>
<td>GL_MODELVIEW</td>
<td>&#x89C2;&#x5BDF;&#x77E9;&#x9635;</td>
</tr>
<tr>
<td>GL_PROJECTION</td>
<td>&#x6295;&#x5F71;&#x77E9;&#x9635;</td>
</tr>
<tr>
<td>glClearDepthf</td>
<td>&#x7ED9;&#x6DF1;&#x5EA6;&#x7F13;&#x5B58;&#x8BBE;&#x5B9A;&#x9ED8;&#x8BA4;&#x503C;</td>
</tr>
<tr>
<td>glHint</td>
<td>&#x5E0C;&#x671B;&#x8FDB;&#x884C;&#x6700;&#x597D;&#x7684;&#x900F;&#x89C6;&#x4FEE;&#x6B63;</td>
</tr>
<tr>
<td>glEnableClientState</td>
<td>&#x542F;&#x7528;&#x9876;&#x70B9;&#x6570;&#x7EC4;&#x7B49;</td>
</tr>
<tr>
<td>glShadeModel</td>
<td>&#x8BBE;&#x7F6E;&#x7740;&#x8272;&#x5668;&#x6A21;&#x5F0F;</td>
</tr>
<tr>
<td>glVertexPointer</td>
<td>&#x6307;&#x5411;&#x9876;&#x70B9;&#x6570;&#x7EC4;</td>
</tr>
<tr>
<td>glColorPointer</td>
<td>&#x6307;&#x5411;&#x989C;&#x8272;&#x6570;&#x7EC4;&#x7684;&#x6307;&#x9488;</td>
</tr>
<tr>
<td>glDrawArrays</td>
<td>&#x7ED8;&#x5236;&#x6570;&#x7EC4;&#x91CC;&#x9762;&#x6240;&#x6709;&#x70B9;&#x6784;&#x6210;&#x7684;&#x5404;&#x4E2A;&#x4E09;&#x89D2;&#x7247;</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th><a href="https://developer.android.google.cn/reference/javax/microedition/khronos/egl/EGLConfig.html" target="_blank">EGLConfig</a>&#x5E38;&#x7528;&#x51FD;&#x6570;</th>
<th>&#x610F;&#x4E49;</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Matrix &#x5E38;&#x7528;&#x51FD;&#x6570;</th>
<th>&#x610F;&#x4E49;</th>
<th>&#x53C2;&#x6570;</th>
</tr>
</thead>
<tbody>
<tr>
<td>orthoM</td>
<td>&#x6B63;&#x4EA4;&#x6295;&#x5F71;</td>
<td>orthoM <br>(<br>float[] m,//&#x63A5;&#x6536;&#x6B63;&#x4EA4;&#x6295;&#x5F71;&#x7684;&#x53D8;&#x6362;&#x77E9;&#x9635;<br>int mOffset,//&#x53D8;&#x6362;&#x77E9;&#x9635;&#x7684;&#x8D77;&#x59CB;&#x4F4D;&#x7F6E;&#xFF08;&#x504F;&#x79FB;&#x91CF;&#xFF09;<br>float left,//&#x76F8;&#x5BF9;&#x89C2;&#x5BDF;&#x70B9;&#x8FD1;&#x9762;&#x7684;&#x5DE6;&#x8FB9;&#x8DDD;<br>float right,//&#x76F8;&#x5BF9;&#x89C2;&#x5BDF;&#x70B9;&#x8FD1;&#x9762;&#x7684;&#x53F3;&#x8FB9;&#x8DDD;<br>float bottom,//&#x76F8;&#x5BF9;&#x89C2;&#x5BDF;&#x70B9;&#x8FD1;&#x9762;&#x7684;&#x4E0B;&#x8FB9;&#x8DDD;<br>float top,//&#x76F8;&#x5BF9;&#x89C2;&#x5BDF;&#x70B9;&#x8FD1;&#x9762;&#x7684;&#x4E0A;&#x8FB9;&#x8DDD;<br>float near,//&#x76F8;&#x5BF9;&#x89C2;&#x5BDF;&#x70B9;&#x8FD1;&#x9762;&#x8DDD;&#x79BB;<br>float far//&#x76F8;&#x5BF9;&#x89C2;&#x5BDF;&#x70B9;&#x8FDC;&#x9762;&#x8DDD;&#x79BB;<br>)</td>
</tr>
<tr>
<td>frustumM</td>
<td>&#x900F;&#x89C6;&#x6295;&#x5F71;</td>
<td>Matrix.frustumM <br>(<br>float[] m,//&#x63A5;&#x6536;&#x900F;&#x89C6;&#x6295;&#x5F71;&#x7684;&#x53D8;&#x6362;&#x77E9;&#x9635;<br>int mOffset,//&#x53D8;&#x6362;&#x77E9;&#x9635;&#x7684;&#x8D77;&#x59CB;&#x4F4D;&#x7F6E;&#xFF08;&#x504F;&#x79FB;&#x91CF;&#xFF09;<br>float left,//&#x76F8;&#x5BF9;&#x89C2;&#x5BDF;&#x70B9;&#x8FD1;&#x9762;&#x7684;&#x5DE6;&#x8FB9;&#x8DDD;<br>float right,//&#x76F8;&#x5BF9;&#x89C2;&#x5BDF;&#x70B9;&#x8FD1;&#x9762;&#x7684;&#x53F3;&#x8FB9;&#x8DDD;<br>float bottom, //&#x76F8;&#x5BF9;&#x89C2;&#x5BDF;&#x70B9;&#x8FD1;&#x9762;&#x7684;&#x4E0B;&#x8FB9;&#x8DDD;<br>float top, //&#x76F8;&#x5BF9;&#x89C2;&#x5BDF;&#x70B9;&#x8FD1;&#x9762;&#x7684;&#x4E0A;&#x8FB9;&#x8DDD;<br>float near,//&#x76F8;&#x5BF9;&#x89C2;&#x5BDF;&#x70B9;&#x8FD1;&#x9762;&#x8DDD;&#x79BB;<br>float far //&#x76F8;&#x5BF9;&#x89C2;&#x5BDF;&#x70B9;&#x8FDC;&#x9762;&#x8DDD;&#x79BB;<br>)</td>
</tr>
<tr>
<td>setLookAtM</td>
<td>&#x8BBE;&#x7F6E;&#x89C2;&#x5BDF;&#x77E9;&#x9635;(&#x76F8;&#x673A;&#x4F4D;&#x7F6E;)</td>
<td>setLookAtM<br> (<br>float[] rm,//&#x63A5;&#x6536;&#x76F8;&#x673A;&#x53D8;&#x6362;&#x77E9;&#x9635; <br>int rmOffset,//&#x53D8;&#x6362;&#x77E9;&#x9635;&#x7684;&#x8D77;&#x59CB;&#x4F4D;&#x7F6E;&#xFF08;&#x504F;&#x79FB;&#x91CF;&#xFF09;<br> float eyeX,float eyeY, float eyeZ, //&#x76F8;&#x673A;&#x4F4D;&#x7F6E;<br>float centerX,float centerY,float centerZ, //&#x89C2;&#x6D4B;&#x70B9;&#x4F4D;&#x7F6E;<br>float upX,float upY,float upZ//up&#x5411;&#x91CF;&#x5728;xyz&#x4E0A;&#x7684;&#x5206;&#x91CF; <br>)</td>
</tr>
<tr>
<td>multiplyMM</td>
<td>&#x77E9;&#x9635;&#x76F8;&#x4E58;</td>
<td>multiplyMM<br>(<br>float[] result,  //&#x63A5;&#x6536;&#x76F8;&#x4E58;&#x7ED3;&#x679C;<br> int resultOffset,//&#x63A5;&#x6536;&#x77E9;&#x9635;&#x7684;&#x8D77;&#x59CB;&#x4F4D;&#x7F6E;&#xFF08;&#x504F;&#x79FB;&#x91CF;&#xFF09;<br> float[] lhs, //&#x5DE6;&#x77E9;&#x9635;<br>  int lhsOffset, //&#x5DE6;&#x77E9;&#x9635;&#x7684;&#x8D77;&#x59CB;&#x4F4D;&#x7F6E;&#xFF08;&#x504F;&#x79FB;&#x91CF;&#xFF09;<br> float[] rhs, //&#x53F3;&#x77E9;&#x9635;<br>  int rhsOffset//&#x53F3;&#x77E9;&#x9635;&#x7684;&#x8D77;&#x59CB;&#x4F4D;&#x7F6E;&#xFF08;&#x504F;&#x79FB;&#x91CF;&#xFF09;<br>)</td>
</tr>
</tbody>
</table>
<h2 id="&#x5E38;&#x7528;&#x51FD;&#x6570;"><a name="&#x5E38;&#x7528;&#x51FD;&#x6570;" class="anchor-navigation-ex-anchor" href="#&#x5E38;&#x7528;&#x51FD;&#x6570;"><i class="fa fa-link" aria-hidden="true"></i></a>1.5. &#x5E38;&#x7528;&#x51FD;&#x6570;</h2>
<pre><code class="lang-text">glFlush ()  //  &#x5F3A;&#x5236;&#x5237;&#x65B0;&#x7F13;&#x51B2;&#xFF0C;&#x4FDD;&#x8BC1;&#x7ED8;&#x56FE;&#x547D;&#x4EE4;&#x5C06;&#x88AB;&#x6267;&#x884C;
eglSwapBuffers () ;// &#x63D0;&#x4EA4;&#x5F53;&#x524D;&#x7684;&#x5E27;
glDisable (GL_DITHER); //  &#x53D6;&#x6D88;&#x6296;&#x52A8;
glEnable (GL_CULL_FACE)  // &#x5F00;&#x542F;&#x5254;&#x9664;&#x64CD;&#x4F5C;&#x6548;&#x679C;
glDeleteTextures () // &#x5220;&#x9664;&#x7EB9;&#x7406;
glDeleteFramebuffers () //
eglGetDisplay() // &#x83B7;&#x53D6;EGLDisplay 
eglInitialize() // &#x521D;&#x59CB;&#x5316;EGL,&#x5E76;&#x56DE;&#x4F20;&#x652F;&#x6301;&#x7684;&#x7248;&#x672C;
eglChooseConfig () // &#x9009;&#x62E9;config
eglCreateContext () //
eglGetConfigAttrib () //    
ANativeWindow_setBuffersGeometry () // &#x8BBE;&#x7F6E; ANativeWindow &#x7ED8;&#x5236;&#x7A97;&#x53E3;&#x5C5E;&#x6027;
ANativeWindow_release () //
eglCreateWindowSurface () //
eglMakeCurrent () //  &#x628A;EGLContext&#x548C;EGLSurface&#x5173;&#x8054;&#x8D77;&#x6765; 
eglDestroySurface () //
eglDestroyContext () //
glBindFramebuffer () // &#x7ED1;&#x5B9A;&#x4E00;&#x4E2A;&#x547D;&#x540D;&#x7684;&#x5E27;&#x7F13;&#x51B2;&#x533A;&#x5BF9;&#x8C61;
glGenFramebuffers () // &#x751F;&#x6210;framebuffer &#x7684;id
glTexImage2D () // &#x751F;&#x6210;&#x4E00;&#x4E2A;2D&#x7EB9;&#x7406;
glFramebufferTexture2D () // &#x7ED1;&#x5B9A;2D&#x7EB9;&#x7406;
glTexParameteri() // &#x56FE;&#x8C61;&#x4ECE;&#x7EB9;&#x7406;&#x56FE;&#x8C61;&#x7A7A;&#x95F4;&#x6620;&#x5C04;&#x5230;&#x5E27;&#x7F13;&#x51B2;&#x56FE;&#x8C61;&#x7A7A;&#x95F4; 
glUniform1f () //&#x4E3A;&#x5F53;&#x524D;&#x7A0B;&#x5E8F;&#x5BF9;&#x8C61;&#x6307;&#x5B9A;Uniform&#x53D8;&#x91CF;&#x7684;&#x503C;&#x3002;
void glUniform1f (  );
void glUniform2f ( );
void glUniform3f ( );
void glUniform4f ( );
void glUniform1i (  );  // &#x4FDD;&#x8BC1;&#x6BCF;&#x4E2A;uniform&#x91C7;&#x6837;&#x5668;&#x5BF9;&#x5E94;&#x7740;&#x6B63;&#x786E;&#x7684;&#x7EB9;&#x7406;&#x5355;&#x5143;&#x3002;
void glUniform2i (   );
void glUniform3i (  );
void glUniform4i (  );
void glUniform1fv (  );
void glUniform2fv ( );
void glUniform3fv (  );
void glUniform4fv ();
void glUniform1iv ( );
void glUniform2iv ( );
void glUniform3iv ( );
void glUniform4iv ( );
void glUniformMatrix2fv ( );
void glUniformMatrix3fv (  );
void glUniformMatrix4fv (  );

EGLBoolean // EGL_TRUE =1, EGL_FALSE=0
EGLint // int &#x6570;&#x636E;&#x7C7B;&#x578B;
EGLDisplay // &#x7CFB;&#x7EDF;&#x663E;&#x793A; ID &#x6216;&#x53E5;&#x67C4;&#xFF0C;&#x53EF;&#x4EE5;&#x7406;&#x89E3;&#x4E3A;&#x4E00;&#x4E2A;&#x524D;&#x7AEF;&#x7684;&#x663E;&#x793A;&#x7A97;&#x53E3;
EGLConfig //Surface&#x7684;EGL&#x914D;&#x7F6E;&#xFF0C;&#x53EF;&#x4EE5;&#x7406;&#x89E3;&#x4E3A;&#x7ED8;&#x5236;&#x76EE;&#x6807;framebuffer&#x7684;&#x914D;&#x7F6E;&#x5C5E;&#x6027;
EGLSurface //&#x7CFB;&#x7EDF;&#x7A97;&#x53E3;&#x6216; frame buffer &#x53E5;&#x67C4; &#xFF0C;&#x53EF;&#x4EE5;&#x7406;&#x89E3;&#x4E3A;&#x4E00;&#x4E2A;&#x540E;&#x7AEF;&#x7684;&#x6E32;&#x67D3;&#x76EE;&#x6807;&#x7A97;&#x53E3;&#x3002;
EGLContext //OpenGL ES &#x56FE;&#x5F62;&#x4E0A;&#x4E0B;&#x6587;&#xFF0C;&#x5B83;&#x4EE3;&#x8868;&#x4E86;OpenGL&#x72B6;&#x6001;&#x673A;&#xFF1B;&#x5982;&#x679C;&#x6CA1;&#x6709;&#x5B83;&#xFF0C;OpenGL&#x6307;&#x4EE4;&#x5C31;&#x6CA1;&#x6709;&#x6267;&#x884C;&#x7684;&#x73AF;&#x5883;&#x3002;
GL_FALSE  //
EGL_NO_DISPLAY //
EGL_NO_SURFACE //
EGL_NO_CONTEXT //
EGL_DEFAULT_DISPLAY  //
EGL_NO_DISPLAY  //
EGL_NO_SURFACE //
EGL_RED_SIZE    //&#x6307;&#x5B9A;RGB&#x4E2D;&#x7684;R&#x5927;&#x5C0F;&#xFF08;bits&#xFF09;
EGL_GREEN_SIZE  //&#x6307;&#x5B9A;G&#x5927;&#x5C0F;
EGL_BLUE_SIZE    //&#x6307;&#x5B9A;B&#x5927;&#x5C0F;
EGL_RENDERABLE_TYPE 
EGL_OPENGL_ES3_BIT_KHR // 
EGL_SURFACE_TYPE // 
EGL_WINDOW_BIT   // 
EGL_NONE //
EGL_CONTEXT_CLIENT_VERSION // context &#x7248;&#x672C;
EGL_NO_CONTEXT  // &#x8868;&#x793A;&#x4E0D;&#x5411;&#x5176;&#x5B83;&#x7684;context&#x5171;&#x4EAB;&#x8D44;&#x6E90;
EGL_NATIVE_VISUAL_ID  // &#x663E;&#x793A;&#x8BBE;&#x5907;&#x7684;&#x539F;&#x59CB;&#x56FE;&#x50CF;&#x7F16;&#x53F7;
NO_TEXTURE // 
ON_DRAWN //
GL_FRAMEBUFFER  //
GL_RGBA //
GL_UNSIGNED_BYTE //
GL_TEXTURE_MIN_FILTER   // &#x7F29;&#x5C0F;&#x8FC7;&#x6EE4;
GL_TEXTURE_MAG_FILTER   // &#x653E;&#x5927;&#x8FC7;&#x6EE4;
GL_TEXTURE_WRAP_S   // S&#x65B9;&#x5411;&#x4E0A;&#x7684;&#x8D34;&#x56FE;&#x6A21;&#x5F0F;
GL_TEXTURE_WRAP_T   //  T &#x65B9;&#x5411;&#x4E0A;&#x7684;&#x8D34;&#x56FE;&#x6A21;&#x5F0F;
GL_LINEAR   //
GL_NEAREST   //
GL_CLAMP_TO_EDGE    //
GL_COLOR_ATTACHMENT0  //
GLES20.GL_REPEAT //
GLES20.GL_LINEAR //
</code></pre>
<h2 id="&#x5E38;&#x7528;&#x7C7B;&#x4E0E;&#x5E38;&#x91CF;&#x53D8;&#x91CF;"><a name="&#x5E38;&#x7528;&#x7C7B;&#x4E0E;&#x5E38;&#x91CF;&#x53D8;&#x91CF;" class="anchor-navigation-ex-anchor" href="#&#x5E38;&#x7528;&#x7C7B;&#x4E0E;&#x5E38;&#x91CF;&#x53D8;&#x91CF;"><i class="fa fa-link" aria-hidden="true"></i></a>1.6. &#x5E38;&#x7528;&#x7C7B;&#x4E0E;&#x5E38;&#x91CF;&#x53D8;&#x91CF;</h2>
<pre><code class="lang-text">GLuint  //  &#x65E0;&#x7B26;&#x53F7;&#x56DB;&#x5B57;&#x8282;&#x6574;&#x578B;&#xFF0C;&#x5305;&#x542B;&#x6570;&#x503C;&#x4ECE;0 &#x5230; 4,294,967,295
GL_DEPTH_TEST  //  &#x6DF1;&#x5EA6;&#x6BD4;&#x8F83;&#x548C;&#x66F4;&#x65B0;&#x6DF1;&#x5EA6;&#x7F13;&#x51B2;
</code></pre>
<h2 id="&#x8865;&#x5145;&#x7EC6;&#x8282;"><a name="&#x8865;&#x5145;&#x7EC6;&#x8282;" class="anchor-navigation-ex-anchor" href="#&#x8865;&#x5145;&#x7EC6;&#x8282;"><i class="fa fa-link" aria-hidden="true"></i></a>1.7. &#x8865;&#x5145;&#x7EC6;&#x8282;</h2>
<pre><code class="lang-xml">1&#x3001;&#x5728;OpenGL&#x4E2D;&#x63D0;&#x5230;&#x7684;&#x6D6E;&#x70B9;&#x6570;&#x90FD;&#x662F;&#x6307;float&#x7C7B;&#x578B;&#x3002;
2&#x3001;&#x5728;OpenGL&#x4E2D;&#xFF0C;&#x6570;&#x7EC4;&#x662F;row-major (&#x884C;&#x4F18;&#x5148;)&#x7684;&#x3002;
3&#x3001;&#x7ED8;&#x5236;&#x4E09;&#x89D2;&#x5F62;&#x53D6;&#x9876;&#x70B9;&#x7684;&#x987A;&#x5E8F; &#x662F;&#x9006;&#x65F6;&#x9488;&#x7684;&#x3002;
4&#x3001;OpenGL&#x4E2D;&#x4F7F;&#x7528;&#x7684;&#x662F;&#x5217;&#x5411;&#x91CF;
</code></pre>
<h2 id="&#x7D22;&#x5F15;&#x7ED8;&#x5236;"><a name="&#x7D22;&#x5F15;&#x7ED8;&#x5236;" class="anchor-navigation-ex-anchor" href="#&#x7D22;&#x5F15;&#x7ED8;&#x5236;"><i class="fa fa-link" aria-hidden="true"></i></a>1.8. &#x7D22;&#x5F15;&#x7ED8;&#x5236;</h2>
<p><img src="https://gitee.com/hnyer/filesOfGitbook/raw/master/files/201803291656_osChina_&#x7D22;&#x5F15;&#x7ED8;&#x5236;.png" alt="">
&#x8FD9;&#x4E2A;&#x591A;&#x8FB9;&#x5F62;&#x7531;2&#x4E2A;&#x4E09;&#x89D2;&#x5F62;&#x7EC4;&#x6210;&#x3002; &#x84DD;&#x8272;&#x548C;&#x7EFF;&#x8272;&#x4E09;&#x89D2;&#x5F62;&#x7684; &#x7EC4;&#x6210;&#x9876;&#x70B9;&#x4F9D;&#x6B21;&#x662F; (V0 , V1 ,V2) ,( V3 ,V4, V5) &#x3002;<br> &#x6CE8;&#x610F;&#xFF1A;&#x7ED8;&#x5236;&#x4E09;&#x89D2;&#x5F62; &#x662F; &#x9006;&#x65F6;&#x9488;&#x7ED8;&#x5236;&#x7684;&#x89C4;&#x5219;&#x3002;<br></p>
<pre><code class="lang-java"><span class="hljs-comment">//&#x9876;&#x70B9;&#x6570;&#x7EC4;&#x5982;&#x4E0B;&#x3002; &#x6709;&#x91CD;&#x53E0;&#x7684;&#x70B9;</span>
[ (<span class="hljs-number">0</span>,<span class="hljs-number">0</span>), (<span class="hljs-number">2</span>,<span class="hljs-number">0</span>), (<span class="hljs-number">1</span>,<span class="hljs-number">2</span>), (<span class="hljs-number">1</span>,<span class="hljs-number">2</span>), (<span class="hljs-number">2</span>,<span class="hljs-number">0</span>), (<span class="hljs-number">3</span>,<span class="hljs-number">2</span>)]
<span class="hljs-comment">//&#x5BF9;&#x5E94;&#x7684;&#x7D22;&#x5F15;&#x6570;&#x7EC4;&#x5982;&#x4E0B;&#x3002; &#x5206;&#x522B;&#x4EE3;&#x8868;&#x9876;&#x70B9;&#x6570;&#x7EC4;&#x4E2D;&#x7684; &#x7B2C; 0,1,2,2,1,5&#x4E2A;&#x6570;&#x636E;</span>
[ <span class="hljs-number">0</span>, <span class="hljs-number">1</span>,<span class="hljs-number">2</span>,  <span class="hljs-number">2</span>,<span class="hljs-number">1</span>,<span class="hljs-number">5</span>]
</code></pre>
<p>&#xA0;&#xA0;</p>
<h2 id="&#x957F;&#x5BBD;&#x6BD4;&#x4F8B;&#x53D8;&#x5F62;&#x95EE;&#x9898;"><a name="&#x957F;&#x5BBD;&#x6BD4;&#x4F8B;&#x53D8;&#x5F62;&#x95EE;&#x9898;" class="anchor-navigation-ex-anchor" href="#&#x957F;&#x5BBD;&#x6BD4;&#x4F8B;&#x53D8;&#x5F62;&#x95EE;&#x9898;"><i class="fa fa-link" aria-hidden="true"></i></a>1.9. &#x957F;&#x5BBD;&#x6BD4;&#x4F8B;&#x53D8;&#x5F62;&#x95EE;&#x9898;</h2>
<p>opengl&#x7684;&#x5750;&#x6807;&#x7CFB;&#x662F; 1:1&#x7684;&#x6BD4;&#x4F8B; &#xFF0C;&#x7136;&#x800C;&#x624B;&#x673A;&#x7B49;&#x8BBE;&#x5907;&#x662F; 16:9 &#x7B49;&#x957F;&#x65B9;&#x5F62;&#x6BD4;&#x4F8B;&#x3002;&#x6240;&#x4EE5;&#x4E00;&#x4E2A;&#x6B63;&#x65B9;&#x5F62;&#x76F4;&#x63A5;&#x663E;&#x793A;&#x5728;&#x5C4F;&#x5E55;&#x540E;&#x5C31;&#x662F;&#x4E00;&#x4E2A;&#x957F;&#x65B9;&#x5F62;&#x3002; &#x6B64;&#x65F6;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x901A;&#x8FC7; &#x8BA1;&#x7B97;&#x8BBE;&#x5907;&#x7684;&#x957F;&#x5BBD;&#x6BD4;&#xFF0C;&#x7136;&#x540E;&#x6839;&#x636E;&#x6BD4;&#x4F8B;&#x91CD;&#x65B0;&#x8BA1;&#x7B97;&#x5728;opengl&#x4E2D;&#x7684;&#x5750;&#x6807; &#xFF0C;&#x6700;&#x7EC8;&#x53EF;&#x4EE5;&#x83B7;&#x5F97;&#x6B63;&#x65B9;&#x5F62;&#x6548;&#x679C;&#x3002; &#x4F46;&#x662F;&#xFF0C;&#x5982;&#x679C;&#x7ED8;&#x5236;&#x7684;&#x56FE;&#x5F62;&#x6BD4;&#x8F83;&#x590D;&#x6742;&#xFF0C;&#x6211;&#x4EEC;&#x901A;&#x8FC7;&#x8FD9;&#x79CD;&#x65B9;&#x5F0F;&#x53BB;&#x8BA1;&#x7B97;&#xFF0C;&#x4F1A;&#x5F88;&#x7E41;&#x7410;&#x3002;&#x6B64;&#x65F6;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x901A;&#x8FC7; &#x53D8;&#x6362;&#x77E9;&#x9635; &#xFF0C;&#x8BA9;opengl&#x5E93;&#x5E2E;&#x6211;&#x4EEC;&#x5B8C;&#x6210;&#x8FD9;&#x4E9B;&#x5DE5;&#x4F5C;&#x3002;  &#x77E9;&#x9635;&#x8F6C;&#x6362;&#x7684;&#x63A8;&#x5BFC;&#x548C;&#x5177;&#x4F53;&#x8F6C;&#x6362;&#x539F;&#x7406;&#xFF0C;&#x4EE5;&#x540E;&#x518D;&#x8BE6;&#x7EC6;&#x5C55;&#x793A;&#xFF0C;&#x6B64;&#x5904;&#x7565;&#x8FC7;&#x3002;</p>
<h2 id="&#x7403;&#x9762;&#x7ED8;&#x5236;"><a name="&#x7403;&#x9762;&#x7ED8;&#x5236;" class="anchor-navigation-ex-anchor" href="#&#x7403;&#x9762;&#x7ED8;&#x5236;"><i class="fa fa-link" aria-hidden="true"></i></a>1.10. &#x7403;&#x9762;&#x7ED8;&#x5236;</h2>
<p>&#x5C06;&#x56FE;&#x7247;&#x7ED8;&#x5236;&#x5230;&#x7403;&#x9762;&#x4F53; &#xFF0C;&#x5F62;&#x6210; &#x5168;&#x666F;&#x6548;&#x679C; &#x3002;
??????????????
&#x800C;&#x6211;&#x4EEC;&#x7684;&#x89C6;&#x89D2;&#x5728;&#x662F;&#x5728;&#x7403;&#x7684;&#x4E2D;&#x5FC3;&#x70B9;&#xFF0C;&#x8FD9;&#x6837;&#x5C31;&#x53EF;&#x4EE5;&#x5411;&#x56DB;&#x9762;&#x516B;&#x65B9;&#x53BB;&#x89C2;&#x770B;&#x4E86;&#x3002;</p>
<h2 id="android-&#x914D;&#x7F6E;opengl-es-&#x73AF;&#x5883;"><a name="android-&#x914D;&#x7F6E;opengl-es-&#x73AF;&#x5883;" class="anchor-navigation-ex-anchor" href="#android-&#x914D;&#x7F6E;opengl-es-&#x73AF;&#x5883;"><i class="fa fa-link" aria-hidden="true"></i></a>1.11. android &#x914D;&#x7F6E;OpenGL ES &#x73AF;&#x5883;</h2>
<pre><code class="lang-xml">// &#x4F7F;&#x7528; opengl es &#x7248;&#x672C;
<span class="hljs-tag">&lt;<span class="hljs-name">uses-feature</span> <span class="hljs-attr">android:glEsVersion</span>=<span class="hljs-string">&quot;0x00020000&quot;</span> <span class="hljs-attr">android:required</span>=<span class="hljs-string">&quot;true&quot;</span> /&gt;</span>
//&#x4F7F;&#x7528;&#x7EB9;&#x7406;&#x538B;&#x7F29;
<span class="hljs-tag">&lt;<span class="hljs-name">supports-gl-texture</span> <span class="hljs-attr">android:name</span>=<span class="hljs-string">&quot;GL_OES_compressed_ETC1_RGB8_texture&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">supports-gl-texture</span> <span class="hljs-attr">android:name</span>=<span class="hljs-string">&quot;GL_OES_compressed_paletted_texture&quot;</span> /&gt;</span>
</code></pre>
<pre><code class="lang-java"><span class="hljs-comment">// EGL &#x7248;&#x672C;</span>
glSurfaceView.setEGLContextClientVersion(<span class="hljs-number">2</span>);
glSurfaceView.setRenderer(<span class="hljs-keyword">new</span> MyGLRenderer(<span class="hljs-keyword">this</span>));
<span class="hljs-comment">// &#x6E32;&#x67D3;&#x6A21;&#x5F0F;</span>
glSurfaceView.setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);

<span class="hljs-comment">/** &#x662F;&#x5426;&#x652F;&#x6301; opengl2.0 + */</span>
<span class="hljs-function"><span class="hljs-keyword">private</span> <span class="hljs-keyword">boolean</span> <span class="hljs-title">checkSupported</span><span class="hljs-params">()</span> </span>{
 ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
 <span class="hljs-keyword">if</span> (activityManager != <span class="hljs-keyword">null</span>) {
     ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
     <span class="hljs-keyword">boolean</span> supportsEs2 = configurationInfo.reqGlEsVersion &gt;= <span class="hljs-number">0x2000</span>;
     <span class="hljs-keyword">boolean</span> isEmulator = Build.VERSION.SDK_INT &gt; Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1
             &amp;&amp; (Build.FINGERPRINT.startsWith(<span class="hljs-string">&quot;generic&quot;</span>)
             || Build.FINGERPRINT.startsWith(<span class="hljs-string">&quot;unknown&quot;</span>)
             || Build.MODEL.contains(<span class="hljs-string">&quot;google_sdk&quot;</span>)
             || Build.MODEL.contains(<span class="hljs-string">&quot;Emulator&quot;</span>)
             || Build.MODEL.contains(<span class="hljs-string">&quot;Android SDK built for x86&quot;</span>));

     supportsEs2 = supportsEs2 || isEmulator;
     <span class="hljs-keyword">return</span> supportsEs2 ;
 }<span class="hljs-keyword">else</span>{
     <span class="hljs-keyword">return</span> <span class="hljs-keyword">false</span>;
 }
}
</code></pre>
<pre><code class="lang-java"><span class="hljs-keyword">final</span> <span class="hljs-keyword">float</span> mTriangleArray[] = {
       -<span class="hljs-number">1.0f</span>,<span class="hljs-number">1.0f</span>,<span class="hljs-number">1.0f</span>,
       -<span class="hljs-number">1.0f</span>,-<span class="hljs-number">1.0f</span>,<span class="hljs-number">1.0f</span>,
       <span class="hljs-number">1.0f</span>,-<span class="hljs-number">1.0f</span>,<span class="hljs-number">1.0f</span>
};
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">test</span><span class="hljs-params">(<span class="hljs-keyword">float</span>[] data)</span>
</span>{
 <span class="hljs-comment">// &#x5206;&#x914D;&#x672C;&#x5730;&#x5185;&#x5B58;&#x5757; , &#x4E00;&#x4E2A;float&#x5360;4&#x4E2A;&#x5B57;&#x8282;</span>
 ByteBuffer bb = ByteBuffer.allocateDirect(data.length * <span class="hljs-number">4</span>);
 <span class="hljs-comment">//&#x4EE5;&#x672C;&#x673A;&#x5B57;&#x8282;&#x987A;&#x5E8F;&#x6765;&#x4FEE;&#x6539;&#x6B64;&#x7F13;&#x51B2;&#x533A;&#x7684;&#x5B57;&#x8282;&#x987A;&#x5E8F;</span>
 bb.order(ByteOrder.nativeOrder());
 FloatBuffer mTriangleBuffer = bb.asFloatBuffer();
 <span class="hljs-comment">//&#x5C06;&#x7ED9;&#x5B9A;float[]&#x6570;&#x636E;&#x4ECE;&#x5F53;&#x524D;&#x4F4D;&#x7F6E;&#x5F00;&#x59CB;&#xFF0C;&#x4F9D;&#x6B21;&#x5199;&#x5165;&#x6B64;&#x7F13;&#x51B2;&#x533A;</span>
 mTriangleBuffer.put(mTriangleArray);
 <span class="hljs-comment">//&#x8BBE;&#x7F6E;&#x6B64;&#x7F13;&#x51B2;&#x533A;&#x7684;&#x4F4D;&#x7F6E;&#x3002;</span>
 mTriangleBuffer.position(<span class="hljs-number">0</span>);
}
</code></pre>
<footer class="page-footer"><span class="copyright">&#x65E0;&#x7248;&#x6743; &#x53EF;&#x4EE5;&#x65E0;&#x9650;&#x5236;&#x4F7F;&#x7528;&#xFF01; all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x66F4;&#x65B0;&#x65F6;&#x95F4;&#xFF1A;
2020-08-20 16:25:42
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../SoundTouch/实现音频变速和变调.html" class="navigation navigation-prev " aria-label="Previous page: 实现音频变速和变调">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="openGLES基础.html" class="navigation navigation-next " aria-label="Next page: openGLES基础">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"openGLES模块","level":"1.12","depth":1,"next":{"title":"openGLES基础","level":"1.12.1","depth":2,"path":"chinese/openGLES/openGLES基础.md","ref":"chinese/openGLES/openGLES基础.md","articles":[]},"previous":{"title":"实现音频变速和变调","level":"1.11.2","depth":2,"path":"chinese/SoundTouch/实现音频变速和变调.md","ref":"chinese/SoundTouch/实现音频变速和变调.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-search","search-plus","todo","anchor-navigation-ex","copy-code-button","versions-select","fontsettings","sharing","tbfed-pagefooter","donate","local-video","splitter","edit-link","expandable-chapters","favicon","theme-comscore","local-video"],"styles":{"website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"无版权 可以无限制使用！","modify_label":"该文件更新时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"todo":{},"splitter":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"versions-select":{"type":"branches"},"donate":{"alipay":"https://gitee.com/hnyer/filesOfGitbook/raw/master/files/201803011956_osChina_支付宝收款码.png","alipayText":"支付宝打赏","button":"打赏","title":"","wechat":"https://gitee.com/hnyer/filesOfGitbook/raw/master/files/201803011956_osChina_微信收款码.png","wechatText":"微信打赏"},"fontsettings":{"family":"sans","size":2,"theme":"sepia"},"highlight":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"favicon":{"shortcut":"assets/images/favicon.ico","bookmark":"assets/images/favicon.ico"},"theme-comscore":{},"local-video":{},"copy-code-button":{},"versions":{"options":[{"value":"https://www.aivin666.cn/java_android/","text":"v1.0"}]},"sharing":{"all":["facebook","google","twitter","weibo","instapaper"],"facebook":false,"google":true,"instapaper":false,"twitter":false,"vk":false,"weibo":true},"edit-link":{"label":"托管页面","base":"https://www.baidu.com/"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{},"search-plus":{}},"theme":"default","author":"Aivin","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Aivin开发笔记","language":"zh-hans","gitbook":"*","description":"Aivin开发笔记"},"file":{"path":"chinese/openGLES/openGLES基础.md","mtime":"2020-08-20T08:25:42.544Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-08-20T09:02:41.305Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-versions-select/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-local-video/video.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

